module mymodule

import json

struct User {
	name string
	age  int
}

pub fn jsondemo() {
	data := '{ "name": "Frodo", "age": 25 }'
	user := json.decode(User, data) or {
		eprintln('Failed to decode json')
		return
	}
	println(user.name)
	println(user.age)
}
